home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
comm
/
uucp
/
AM114src.lha
/
getreplyto.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-25
|
2KB
|
53 lines
/*
*
* AM --- AmigaMail
* (C) 1991, 1992 by Christian Riede
*
* AM is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY. No author or distributor accepts responsibility to anyone
* for the consequences of using it or for whether it serves any
* particular purpose or works at all, unless he says so in writing.
* Refer to the GNU General Public License, Version 1, for full details.
*
* Everyone is granted permission to copy, modify and redistribute AM,
* but only under the conditions described in the GNU General Public
* License, Version 1. A copy of this license is supposed to have been
* given to you along with AM so you can know your rights and responsi-
* bilities. It should be in a file named COPYING. Among other things,
* the copyright notice and this notice must be preserved on all copies.
*
*
*
*/
#include "am.h"
char *GetReplyTo(char *Username,char *Buffer)
{
struct List Addressbook;
struct Address *Address;
/* Reply-To address from addressbook overrides global Reply-To address */
strcpy(Buffer,ReplyTo);
/* read addressbook */
ReadAddressBook(&Addressbook);
for (Address = (struct Address *)Addressbook.lh_Head;
Address->Node.ln_Succ;
Address = (struct Address *)Address->Node.ln_Succ)
{
if (!(strcmp(Address->Username,Username)))
{
if (*Address->ReplyTo)
strcpy(Buffer,Address->ReplyTo);
break;
}
}
/* free addressbook */
FreeAddressBook(&Addressbook);
return(Buffer);
}